home *** CD-ROM | disk | FTP | other *** search
- IniTool Version 2.42
- --------------------
-
- Copyright 1994 by McAfee, Inc. Copyright 1993-1994 by Computer Tyme,
- Inc. Licensed to McAfee, Inc. from Computer Tyme, Inc.
-
- IniTool, a Windows *.INI file manipulator, assists network
- administrators in performing system-wide changes to users' INI
- files. With IniTool, an administrator can change, add and delete
- items from INI files. IniTool is a DOS command-line program that an
- administrator can easily add to a DCL or login script.
-
- Running IniTool
- ---------------
- Syntax: INITOOL ControlFile IniFile
- or
- INITOOL IniFile
-
- IniTool modifies the IniFile by performing the changes indicated in
- ControlFile. If IniFile does not exist, IniTool creates the file
- according to the commands in the ControlFile. The default extension
- for ControlFile and IniFile is .INI. If you use only one parameter,
- IniTool assumes ControlFile is the same name as IniFile except
- ControlFile's extension is .CTL.
-
- Example 1: INITOOL change.ctl system.ini
-
- In Example 1, CHANGE.CTL is the control file and SYSTEM.INI is the
- INI file.
-
- Example 2: INITOOL system.ini
-
- In Example 2, SYSTEM.CTL is the control file and SYSTEM.INI is the
- INI file.
-
- Creating a Control File
- -----------------------
- The control file's format is similar to an INI file, but it also
- contains IniTool commands. You can use these commands to easily
- modify an INI file. The commands are as follows:
-
- ADD DUPLICATES
- ADDITEM FIRST
- ADDVALUE IF...ELSE...ENDIF
- AFTER LOG
- BEFORE NOBACKUP
- CHANGE SUBST
- DEL TESTMODE
- DELITEM YAK
-
- For a description of each command, see "Commands". For more
- information about the IF command, see "Conditionals".
-
- A semicolon at the beginning of a line represents a comment. IniTool
- does not process a commented line.
-
- To easily add or change lines in an INI file, you can list lines in
- the control file without the ADD or CHANGE command. If you want to
- modify a line if it does exist and add the line if it does not, do
- not use the ADD or CHANGE command.
-
- For example:
- [386Enh]
- ADD Test=3
- CHANGE mydevice=mydriver.386
- Paging=1
-
- If the [386Enh] section does not exist, IniTool creates the section
- when it adds an item.
-
- IniTool adds the Test line if there is no other occurrence of Test
- in the [386Enh] section. If the [386Enh] section contains Test=2,
- the line remains Test=2.
-
- IniTool changes the mydevice line if mydevice exists in the [386Enh]
- section. If the [386Enh] section contains no occurrence of mydevice,
- IniTool does not add the mydevice line.
-
- IniTool either adds the Paging line if there is no other occurrence
- or changes the Paging line if Paging exists in the [386Enh] section.
-
- Device
- ------
- IniTool automatically adds the device= line to the [386Enh] section
- unless the exact line already exists. For example, if the
- device=vshare.386 line exists in the [386Enh] section, IniTool does
- not add an additional device=vshare.386 line to the section. If the
- device=vshare.386 line does not exist in the [386Enh] section,
- IniTool adds the line to the section. IniTool never changes an
- existing device= line unless you use the CHANGE command.
-
- Groups
- ------
- IniTool can add, change, and delete numbered Group lines in the
- [Groups] section of the PROGMAN.INI. It is not necessary to know the
- Group number to perform these modifications. When adding groups,
- IniTool scans for the lowest unused Group number.
-
- For example, if the PROGMAN.INI contains:
-
- [Groups]
- Group1=H:\WINDOWS\MAIN.GRP
- Group2=H:\WINDOWS\ACCESSOR.GRP
- Group4=H:\WINDOWS\STARTUP.GRP
- Group5=H:\WINDOWS\BP7.GRP
- Group6=H:\WINDOWS\ALDUS.GRP
- Group7=F:\HOME\JOHN\WINDOWS\WORDFORW.GRP
- Group8=F:\HOME\JOHN\WINDOWS\MICROSOF.GRP
- Group3=F:\HOME\JOHN\WINDOWS\EDOS.GRP
-
- And your control file contains:
-
- [Groups]
- DEL Group=BP7.GRP
- Group=MAIN.GRP
- Group=MYGROUP.GRP
- DEL Group=EDOS.GRP
- Group=Z:\SYSTEM\TEST.GRP
- Group=MASTER.GRP
-
- After executing IniTool, your PROGMAN.INI contains:
-
- [Groups]
- Group1=MAIN.GRP
- Group2=H:\WINDOWS\ACCESSOR.GRP
- Group4=H:\WINDOWS\STARTUP.GRP
- Group6=H:\WINDOWS\ALDUS.GRP
- Group7=F:\HOME\JOHN\WINDOWS\WORDFORW.GRP
- Group8=F:\HOME\JOHN\WINDOWS\MICROSOF.GRP
- Group5=MYGROUP.GRP
- Group3=Z:\SYSTEM\TEST.GRP
- Group9=MASTER.GRP
-
- Commands
- --------
- ADD
- Syntax: ADD keyword=value
- Adds the line if the line does not exist in the section. If the line
- does exist in the section, it remains unchanged.
-
- ADDITEM
- Syntax: ADDITEM keyword=item to add
- Adds an item to the end of an existing line. If the line does not
- exist in the section, IniTool adds the line. For example, you can
- change "Run=Prog1" to "Run=Prog1 Prog2" using ADDITEM Run=Prog2.
-
- ADDVALUE
- Syntax: ADDVALUE keyword=value to add
- Adds a positive value to or subtracts a negative value from an
- existing line. For example, you can change "NumValue=9" to
- "NumValue=12" using ADDVALUE NumValue=3.
-
- AFTER
- Syntax: AFTER keyword
- Command keyword=value
- Moves the next added or changed line after the line specified in
- AFTER.
-
- BEFORE
- Syntax: BEFORE keyword
- Command keyword=value
- Moves the next added or changed line before the line specified in
- BEFORE.
-
- CHANGE
- Syntax: CHANGE keyword=new value
- Changes the line if it exists in the section. If the line does not
- exist, it is not added.
-
- DEL
- Syntax: DEL keyword
- or
- DEL [section]
- Deletes the line or entire section if it exists. For example, you
- can delete the entire [Desktop] section using DEL [Desktop].
-
- DELITEM
- Syntax: DELITEM parameter=item to delete
- Deletes an item from an existing line. For example, you can change
- "Run=Prog1 Prog2" to "Run=Prog2" using DELITEM Run=Prog1.
-
- DUPLICATES
- Syntax: DUPLICATES keyword=[section]
- or
- DUPLICATES keyword=[*]
- Allows you to use duplicate keywords in a section or INI file (use
- the asterisk * to represent the entire file). Specify the
- duplicates at the beginning of the control file. IniTool
- automatically sets the device= line as a duplicate in the [386Enh]
- section.
-
- FIRST
- Syntax: FIRST
- Command keyword=value
- Moves the next added or changed line to the beginning of the
- section.
-
- IF...ELSE...ENDIF
- Syntax: IF condition
- command
- ELSE
- command
- ENDIF
- Performs the IF command, if the condition is true; otherwise,
- IniTool performs the ELSE command (when specified). IniTool does not
- require the ELSE command. Use the ENDIF command when listing more
- than one command after ELSE. When using an IF command without an
- ELSE command, use the ENDIF command when listing more than one
- command after IF. In IniTool, you can place IF commands within IF
- commands (nesting). For examples using the IF...ELSE...ENDIF
- command, refer to "Conditionals".
-
- LOG
- Syntax: LOG filename
- Creates a log of changes made to the INI file. Use this command
- before the first section header. If you do not specify an extension,
- IniTool assumes the extension .LOG.
-
- NOBACKUP
- Syntax: NOBACKUP
- Deletes the backup BNI file immediately after IniTool modifies the
- IniFile.
-
- SUBST
- Syntax: SUBST 'OldString' 'NewString'
- Replaces a string throughout a section or file. Use the SUBST
- command at the beginning of the control file (before any section
- names) to replace a string throughout an INI file. For example, you
- can change "C:\WINDOWS" to "G:\WIN" throughout an INI file using
- SUBST 'C:\WINDOWS' 'G:\WIN' at the beginning of the control file.
-
- The SUBST command also supports references to environment variables.
- For example, you can reference the USER variable to access John's
- version of Windows (F:\JOHN\WINDOWS) using F:\%USER%\WINDOWS.
-
- TESTMODE
- Syntax: TESTMODE
- Modifies the BNI file rather than the INI file. Use this command
- before the first section header.
-
- YAK
- Syntax: YAK
- Displays changes on screen. Use this command before the first
- section header.
-
- Conditionals
- ------------
- IniTool supports conditional changes. If the condition is met,
- IniTool performs the specified command(s).
-
- IF condition
- command
- ELSE
- command
- ENDIF
-
- AND
- Returns the logical AND of two values.
- Example: IF InGroup 'EveryOne' AND InGroup 'Accounting'
-
- OR
- Returns the logical OR of two values.
- Example: IF InGroup 'EveryOne' OR InGroup 'Accounting'
-
- NOT
- Returns the logical NOT of a value.
- Example: IF NOT InGroup 'EveryOne'
-
- +
- Adds two values.
- Example: IF 'A' + 'B' = 'AB'
-
- -
- Subtracts two values.
- Example: IF 5 - 3 < 4
-
- =
- Compares two values and returns true if they are equal.
- Example: IF 2 + 2 = 4
-
- <>
- Compares two values and returns true if they are not equal.
- Example: IF 2 + 2 <> 5
-
- >
- Compares two values and returns true if the first value is greater
- than the second value.
- Example: IF 'D' > 'C'
-
- <
- Compares two values and returns true if the first value is less than
- the second value.
- Example: IF 'C' < 'D'
-
- >=
- Compares two values and returns true if the first value is greater
- than or equal to the second value.
- Example: IF 'D' >= 'C'
-
- <=
- Compares two values and returns true if the first value is less than
- or equal to the second value.
- Example: IF 'C' <= 'D'
-
- ( )
- Parentheses begin and end logical groupings for interpretation.
- Example: IF ('A' < 'B') AND (9 > (5 + 3))
-
- CPU
- Returns the class of the CPU chip.
- Example: IF CPU >= 3
-
- DayOfWeek
- Returns the first three letters of the day of the week.
- Example: IF DayOfWeek = 'TUE'
-
- Display
- Returns the type of video card. Types returned are HERC, CGA, EGA,
- VGA.
- Example: IF Display = 'VGA'
-
- InGroup 'Group'
- Returns true if the user is in the group.
- Example: IF InGroup 'EveryOne'
-
- InMem TSR_filename
- Returns true if the terminate and stay resident (TSR) program is
- loaded. IniTool requires only the 8 character filename without an
- extension.
- Example: IF InMem SMARTDRV
-
- MathChip
- Returns true if there is a math coprocessor.
- Example: IF MathChip
-
- Month
- Returns the first three letters of the Month.
- Example: IF Month = 'AUG'
-
- ReadEnv 'Environment String'
- Returns the value of an environment variable.
- Example: IF ReadEnv 'ENHANCED' = 'Y'
-
- Station
- Returns the workstation address on a network.
- Example: IF Station = '250:33333'
-
- UpperCase
- Returns the UpperCase of a string.
- Example: IF UpperCase ReadEnv 'ENHANCED' = 'Y'
-
- UserName
- Returns the login name of the user.
- Example: IF UserName = 'John'
-
- ValueOf
- Returns the value of an element in the current section.
- Example: IF ValueOf 'PagingDrive' <> 'H'
- PagingDrive=C
- ENDIF
-
- VLMLoaded
- Returns true if the VLM is loaded in the Novell VLM shells. Returns
- false if the VLM is not loaded or it is not a Novell network.
- Example: IF VLMLoaded NETSHLD
-
- Backup Files
- ------------
- When executed, IniTool creates a backup of the original INI file
- with a *.BNI extension. To replace the new INI file with the latest
- BNI file, type:
-
- INITOOL restore IniFile
-
- This command deletes the current IniFile and renames the BNI file to
- the IniFile.
-
- Updating Multiple INI Files
- ---------------------------
- You can update several INI files by creating a ListFile. A ListFile
- should contain a list of INI files you want to update. To modify
- several INI files, create a ListFile with the following format:
-
- directory\IniFile
- directory\IniFile
-
- To use the ListFile, type:
-
- INITOOL ControlFile ListFile
-
- You can also pipe a list of files to IniTool. For example,
-
- WHEREIS IniFile|INITOOL ControlFile
-
- IniDif
- ------
- IniDif compares two INI files and produces a third file containing
- the differences between the two INI files. You can use IniDif to
- compare a changed INI file to an original INI file after, for
- example, an installation. You can then use the third file as a
- ControlFile to perform modifications on other INI files.
-
- Syntax: INIDIF NewFile OldFile ControlFile
-
- Example: INIDIF system.ini system.old system.ctl
-
- In this example, IniDif compares the new SYSTEM.INI file to the old
- SYSTEM.OLD file and lists the differences in the SYSTEM.CTL file.
-
-
-
-
-